<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<!doctype html>


<s:include value="header/header.jsp" />

<s:include value="menu/menu.jsp" />
<s:form  id="addStaff" name="addStaff" action="Staff!insert" method="post" theme="simple">
<div id="content">

	<div id="contentHeader">
		<h1></h1>
	</div>
	<!-- #contentHeader -->

	<div class="container">
		<div class="grid-16">

			<div class="widget">

				<div class="widget-header">
					<span class="icon-article"></span>
					<h3>Thêm Nhân Viên Mới</h3>
				</div>

				<div class="widget-content">
				<form class="form uniformForm">
				<fieldset>
					<div class="field-group">
						<label>Họ Và Tên :</label>
						<div class="field">
							<%-- <s:hidden id="staffId" name="staffId"/> --%>
							<s:textfield id="staffName" name="sta.staffName" size="30" />
						</div>
					</div>
					<div class="field-group">
						<label>Tên tài khoản :</label>
						<div class="field">
							<s:textfield id="staffUser" name="sta.staffUser" size="30" />
						</div>
					</div>
					<div class="field-group">
						<label>Mật khẩu :</label>
						<div class="field">
							<s:password id="staffPass" name="sta.staffPass" size="30" />
						</div>
					</div>
					<%-- <div class="field-group">
						<label>Nhập lại mật khẩu :</label>
						<div class="field">
							<s:textfield id="" name="" size="30" />
						</div>
					</div> --%>
					<div class="field-group">
						<label>Địa Chỉ :</label>
						<div class="field">
							<s:textfield id="address" name="sta.address" size="30" />
						</div>
					</div>
					<!-- .field-group -->
					<div class="field-group">
						<label>Điện Thoại :</label>
						<div class="field">
							<s:textfield id="phone" name="sta.phone" size="30" />

						</div>
					</div>
					<!-- .field-group -->

					<div class="field-group">
						<label>Email :</label>
						<div class="field">
							<s:textfield id="email" name="sta.email" size="30" />

						</div>
					</div>
					<div class="field-group">
						<label>Vị trí :</label>
						<div class="field">
<%-- 							<s:select list="listUseg" listValue="%{grouptxt}" ></s:select>
 --%>							<s:select list="listUseg" listValue="grouptxt" listKey="usergId" name="sta.usergroup.usergId"></s:select>
						</div>
					</div>
					<%-- <div class="field-group">
						<label>Vị trí :</label>
						<div class="field">
							<s:select name="sta.usergroup.usergId"
							list="#{1:'Quản Trị Viên', 2:'Nhân viên văn phòng', 3:'Nhân viên lao động' }"/>
						</div>
					</div> --%>
				</fieldset>
				<div class="#" id="button-insert-staff">
					<button type="submit" class="btn btn-primary">Save</button>
				</div>
				</form>
				</div>
				<!-- .widget-content -->
				
			</div>
			<!-- .widget -->
		</div>
		<!-- .grid -->


	</div>
	<!-- .container -->

</div>
<!-- #content -->
</s:form>


<script src="javascripts/all.js"></script>

<script>
$(function () { 
	$( "#datepicker" ).datepicker();
	$( "#datepicker_inline" ).datepicker();
	$('#colorpickerHolder').ColorPicker({flat: true});
	$('#timepicker').timepicker ({ 
		showPeriod: true 
		, showNowButton: true
		, showCloseButton: true
	});
	
	$('#timepicker_inline_div').timepicker({
	   defaultTime: '9:20'
	});		
		
	$('#colorSelector').ColorPicker({
		color: '#FF9900',
		onShow: function (colpkr) {
			$(colpkr).fadeIn(500);
			return false;
		},
		onHide: function (colpkr) {
			$(colpkr).fadeOut(500);
			return false;
		},
		onSubmit: function (hsb, hex, rgb, el) {
			$(el).ColorPickerHide ();	
		},
		onChange: function (hsb, hex, rgb) {
			$('#colorSelector div').css({ 'background-color': '#' + hex });
			$('#colorpickerField1').val ('#' + hex);
		}
	});
	
	$('#colorpickerField1').live ('keyup', function (e) {
		var val = $(this).val ();
		val = val.replace ('#', '');
		$('#colorSelector div').css({ 'background-color': '#' + val });
		$('#colorSelector').ColorPickerSetColor(val);
	});
	
	
	//binhpv
	$('#button-insert-staff').click(function(){
		document.forms["addStaff"].submit();
	});

});

</script>

</body>
</html>